package com.yoyo.itravel.service;

import com.yoyo.itravel.bean.*;
import com.yoyo.itravel.exceptions.FlightTicketTypeException;

import java.util.List;

/**
 * @author liuchaojie
 * @version 1.0
 * @Description 机票类型服务层接口【服务层】
 * @date 2020/6/18 18:14
 */
public interface IFlightTicketTypeService {
    /**
     * 新增机票类型
     * @return
     * @throws FlightTicketTypeException
     */
    boolean add(FlightTicketType flightTicketType) throws FlightTicketTypeException;

    /**
     * 根据机票id删除机票信息
     * @param ticketTypeId
     * @return
     * @throws FlightTicketTypeException
     */
    boolean deleteByTicketTypeId(String ticketTypeId) throws FlightTicketTypeException;

    /**
     * 根据机票id修改机票信息
     * @param flightTicketType
     * @return
     * @throws FlightTicketTypeException
     */
    boolean changeTicketTypeId(FlightTicketType flightTicketType) throws FlightTicketTypeException;

    /**
     * 查询所有机票信息
     * @return
     * @throws FlightTicketTypeException
     */
    List<FlightTicketType> selectAll() throws FlightTicketTypeException;

    /**
     * 根据ticketTypeId查询机票类型信息
     * @param ticketTypeId
     * @return
     * @throws FlightTicketTypeException
     */
    FlightTicketType selectOne(String ticketTypeId) throws FlightTicketTypeException;
}
